home *** CD-ROM | disk | FTP | other *** search
/ Flash MX Savvy / FlashMX Savvy.iso / pc / WIN / Amapi3D / Amapi3D61TE.exe / data1.cab / Common / 3SPACE / ShowBehavior.js < prev    next >
Encoding:
JavaScript  |  2001-06-19  |  909 b   |  47 lines

  1. // -* ShowBehavior.js *-
  2. //
  3. // Name: Show behavior
  4. // Description: 
  5. // Author:
  6. // Version: $Id: ShowBehavior.js,v 1.4 2001/02/27 12:03:24 consumer Exp $
  7. //
  8.  
  9. function ShowBehavior()
  10. {
  11.   // No need for an object with this behavior.
  12. }
  13.  
  14. function ShowBehaviorStart(solidName, geom)
  15. {
  16.   // Member variables of the behavior
  17.   this.solidName = solidName;
  18.   this.geom = geom;
  19.   
  20.   TSUpdateNodeAttribute(geom, 'visible', '1');
  21. }
  22.  
  23. function ShowBehaviorStop()
  24. {
  25.   TSUpdateNodeAttribute(this.geom, 'visible', '0');
  26. }
  27.  
  28. //
  29. // Event functions
  30. //
  31.  
  32. function ShowBehaviorStartEvent(obj, event)
  33. {
  34.   var geom = TSGetExtraParam(event, 'geom');
  35.   var targetSolid = TSGetExtraParam(event, 'targetSolid');
  36.  
  37.   if (targetSolid == "")
  38.     ShowBehaviorStart(obj, geom);
  39.   else
  40.     ShowBehaviorStart(targetSolid, geom);
  41. }
  42.  
  43. function ShowBehaviorStopEvent(obj, event)
  44. {
  45.   ShowBehaviorStop() ;
  46. }
  47.